﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Noke.Common.Model
{
    public class PropertyAttribute : Attribute
    {
        public static readonly PropertyAttribute Default;

        public PropertyAttribute() { }
        public PropertyAttribute(string columnName, string description, Type dataType)
        {
            this.columnName = columnName;
            this.description = description;
            this.dataType = dataType;
        }
        private string columnName = string.Empty;
        public string ColumnName { get { return this.columnName; } }

        private string description = string.Empty;
        public string Description { get { return this.description; } }

        private Type dataType = null;
        public Type DataType { get { return this.dataType; } }
        
        public override bool Equals(object obj)
        {
            return obj.ToString().ToLower().Equals(columnName.ToLower());
        }
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
        public override bool IsDefaultAttribute()
        {
            return base.IsDefaultAttribute();
        }
    }
}
